#include "stdafx.h"
#include "wf_setsnaprestriction.h"



/**
 * Constructor.
 *
 * @param snapRes The new snap mode used from now on.
 * @param set true: set additional snap mode / false: unset
 */
WF_SetSnapRestriction::WF_SetSnapRestriction(
        PF_Container& container,
        PF_GraphicView& graphicView,
        LX_Define::SnapRestriction snapRes)
        :PF_ActionInterface("Set Additional Snap Mode", container, graphicView) {

    this->snapRes = snapRes;
}



void WF_SetSnapRestriction::trigger() {
    graphicView->setSnapRestriction(snapRes);
	
    finish();
}



void WF_SetSnapRestriction::init(int status) {
    PF_ActionInterface::init(status);
    trigger();
}

// EOF
